const { createProxyMiddleware } = require('http-proxy-middleware');

module.exports = function(app) {
    app.use(
        createProxyMiddleware('/api', { 
            target: 'https://reactapi.iynn.cn',
            changeOrigin: true,
            pathRewrite: { '^/api': '' }
        })
    )
}